package com.yinxin.Enum;

/**
 * @Author: YinXin
 * @Date: 2021/9/12 18:27
 * @Version: 1.0
 * @description:
 */
public enum ResultEnum {
        //这里是可以自己定义的，方便与前端交互即可
        UNKNOWN_ERROR(-1,"未知错误"),
        SUCCESS(200,"成功"),
        SERVER_INTERNAL_ERROR(500,"服务器内部错误"),
        RESOURCE_NOT_FOUND(404,"资源未找到"),
        PARAMETER_NOT_VALID(400,"参数不合法"),
        ERROR_TYPE(000,"请求类型错误！")
        ;
        private Integer code;
        private String msg;

        ResultEnum(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

}
